package com.songxh.infrastructure.db.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.songxh.core.base.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

/**
 * @author songxh
 * @create 2023-01-10-16:20
 */
@Data
@EqualsAndHashCode(callSuper = false)
@AllArgsConstructor
@NoArgsConstructor
@TableName("s_comment")
public class Comment extends BaseEntity {

    /**
     * 主键
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 评论内容
     */
    private String content;

    /**
     * 文章id
     */
    private Long articleId;

    /**
     * 该评论作者id
     */
    private Long currentUid;

    /**
     * 父评论id，类似盖楼
     */
    private Long parentId;

    /**
     * 上层评论的作者id
     */
    private Long toUid;

    /**
     * 层级
     */
    private Integer level;

    /**
     * 点赞数量
     */
    private Long likeCounts;
}
